package wangjg.android;

import android.app.Activity;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ScrollView;

public class BasicActivity extends Activity {
	
    protected View inflate(int resource){
    	Log.d(this.getClass().getName(), "inflate ....");
    	LayoutInflater layoutInflater = LayoutInflater.from(this);
    	View view = layoutInflater.inflate(resource, null);
		return view;
    }
    
    protected void scrollDown(final ScrollView sv){
		sv.post(new Runnable() {
	           public void run() {
	        	   sv.fullScroll(View.FOCUS_DOWN);     
	           }     
	       });  
    }
}
